<?php
/**
 * abstract class for logs
 *
 * @abstract
 * @author raphael seebacher <raphasee@ee.ethz.ch>
 * @version 0.01
 */
abstract class log extends model {
    protected static $date_format = 'Y-m-d h:i:s';

    abstract protected function write($str);

    /**
     * method to log a given string
     *
     * @param string $str the string which will be logged.
     */
    public function log($str) {
        $msg = date(self::$date_format)."\t".$str."\n";
        $this->write($msg);
    }
}
?>